Skip to content

chore(deps): remove unused and unmaintained dependencies - #266

Merged
matrixise merged 2 commits into
masterfrom
chore/remove-unused-deps
Nov 21, 2026
Merged

matrixise merged 2 commits into
masterfrom
chore/remove-unused-deps

Conversation

@matrixise

Copy link
Copy Markdown
Contributor

Why

Several dependencies are never used, or are unmaintained. They make the Heroku slug and the dev setup heavier for nothing.

Removed

Dependency Reason
redis (+ fakeredis, settings/configure.py, redis:6.2 compose service, REDISCLOUD_URL) settings.REDIS was created in every settings module but never read anywhere in the code
pandas (+ numpy) never imported
pydantic (direct dependency) never imported directly; still installed through Wagtail
pytz only used for UTC in a test; replaced by datetime.UTC
model_mommy → model_bakery unmaintained since 2019 and emits a DeprecationWarning; model_bakery is its official successor (same API, baker.make)

Also removed: the commented-out Celery and Redis cache examples in settings/production.py, and redis-server in the Vagrant provisioning script. README, CLAUDE.md, CONTRIBUTING.md and DEVELOPMENT.md are updated.

Kept on purpose: dj-static

dj-static looks redundant with WhiteNoise, but it is not. django-compressor writes static/CACHE/css|js/output.* at request time (COMPRESS_OFFLINE = False), after WhiteNoise has indexed the static files at startup. Only dj-static's Cling serves those files. Removing it made every page return 404 for its CSS/JS in the end-to-end check. Replacing it properly (offline compression at build time, then dropping dj-static) is a separate change.

Follow-up on Heroku (manual)

The RedisCloud add-on is no longer used by the code. It can be removed once this is deployed: heroku addons / heroku addons:destroy rediscloud.

Tests

  • manage.py check (tests and dev settings): no issues. Test suite: 7 tests OK, without the model_mommy deprecation warning.
  • ruff and prek hooks pass.
  • End-to-end check (scripts/upgrade-check/run.sh --base master --docker, from feat(scripts): add an end-to-end upgrade check #264):
    • Docker image builds
    • no migrations, collectstatic --clear OK
    • public pages HTML byte-identical to master
    • all 12 browser steps pass, no 4xx/5xx responses

Note: #264 was updated so the check no longer imports fakeredis. This PR and #265 both touch uv.lock; whichever is merged second may need a uv lock rebase.

🤖 Generated with Claude Code

matrixise and others added 2 commits November 21, 2026 17:28
- Redis: settings.REDIS was created in every settings module but never
  read anywhere. Remove redis, fakeredis, settings/configure.py, the
  redis service from docker-compose and REDISCLOUD_URL from the docs
  and development.env.
- pandas (and numpy): never imported.
- pydantic: never imported directly; still installed through Wagtail.
- pytz: only used for UTC in a test; use datetime.UTC instead.
- model_mommy: unmaintained since 2019 and emits a DeprecationWarning;
  replace it with its successor model_bakery.
- Drop the commented-out Celery and Redis cache examples from the
  production settings and the redis-server line from the Vagrant
  provisioning script.

dj-static is kept on purpose: django-compressor writes CACHE/ files at
request time, after WhiteNoise has indexed the static files, and only
dj-static's Cling serves them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@matrixise
matrixise merged commit b33bb8d into master Nov 21, 2026
4 checks passed
@matrixise
matrixise deleted the chore/remove-unused-deps branch November 21, 2026 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant